package org.apple.sensor.monitor;

//import java.util.Properties;

public abstract class SensorMonitor {
	
	protected int sensorPeriod = 5;//this maybe a default value;
	
	public void init() {
	};

	public void startMonitor() {
		Thread monitorThread = new Thread() {
			public void run() {
				while(true){
					try{ Thread.sleep(sensorPeriod);}
					catch (InterruptedException e){}
					monitor();				
				}
			}
		};
		monitorThread.start();
		
	};

	protected abstract void monitor();

}
